<template>
    <div style="margin: 10px 0">
        <el-input
                v-model="search"
                placeholder="请输入关键字"
                style="width: 200px"
                clearable
        >
        </el-input>
        <el-button type="primary" style="margin-left: 5px" @click="load"
        >查询</el-button>
    </div>
    <el-table v-bind:data="tableData" :default-expand-all="true" class="parentTable"
              ref="multipleTable"
              v-loading="loading"
              element-loading-text="拼命加载中">
        <el-table-column label="订单编号" align="center" width="180"></el-table-column>
        <el-table-column label="商品名称" width="199"></el-table-column>
        <el-table-column label="订单价格" width="114"></el-table-column>
        <el-table-column label="是否付款"  width="300"></el-table-column>
        <el-table-column label="是否发货" align="center" width="120"></el-table-column>
        <el-table-column label="下单时间"></el-table-column>
        <el-table-column label="操作" align="center" width="118">
            <template v-slot="scope">
                <el-button @click="handletwo(scope.row)" type="text" size="small">查看</el-button>
                <el-button type="text" size="small">编辑</el-button>
            </template>
        </el-table-column>
    </el-table>
</template>

<script>
    export default {
        name:"orderFiltering",
        data() {
            return {
                tableData: [{
                    date: '2016-05-03',
                    name: '王小虎',
                    address: '上海市普陀区金沙江路 1518 弄'
                }, {
                    date: '2016-05-02',
                    name: '王小虎',
                    address: '上海市普陀区金沙江路 1518 弄'
                }, {
                    date: '2016-05-04',
                    name: '王小虎',
                    address: '上海市普陀区金沙江路 1518 弄'
                }, {
                    date: '2016-05-01',
                    name: '王小虎',
                    address: '上海市普陀区金沙江路 1518 弄'
                }, {
                    date: '2016-05-08',
                    name: '王小虎',
                    address: '上海市普陀区金沙江路 1518 弄'
                }, {
                    date: '2016-05-06',
                    name: '王小虎',
                    address: '上海市普陀区金沙江路 1518 弄'
                }, {
                    date: '2016-05-07',
                    name: '王小虎',
                    address: '上海市普陀区金沙江路 1518 弄'
                }],
                multipleSelection: []
            }
        },

        methods: {
            toggleSelection(rows) {
                if (rows) {
                    rows.forEach(row => {
                        this.$refs.multipleTable.toggleRowSelection(row);
                    });
                } else {
                    this.$refs.multipleTable.clearSelection();
                }
            },
            handleSelectionChange(val) {
                this.multipleSelection = val;
            }
        }
    }
</script>
<style>
</style>